package com.fyyxz.innerClassTest;

import com.fyyxz.proxy.Passenger;
import com.fyyxz.proxy.PassengerProxy;
import com.fyyxz.proxy.RealPassenger;

public class InnerTest {
	
	Integer i = 120;

	public static void main(String[] args) {
		B b = new B();
		   Passenger passenger = (Passenger) b.obj(new RealPassenger());
		   passenger.buyTicket();
		System.out.println();
		

	}
	public void testA(){
		A a = new A();
		System.out.println(a.getS());
		
	}

	private  class A {
		public A(){
			System.out.println(i);
			System.out.println("内部类A初始化");
		}
		public String getS(){
			return "AAAAAAAAAAAA";
		}
	}
}
class B extends PassengerProxy{
	public B(){
		System.out.println("内部类B初始化");
	}
	public String getS(){
		return "BBBBBBBBBBBB";
	}
	public static void main(String[] args) {
		B b = new B();
		InnerTest i = new InnerTest();
		i.testA();
		System.out.println();
		

	}
	
}